home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
pdcurs21.zip
/
PORTABLE.ZIP
/
KEYPAD.C
< prev
next >
Wrap
Text File
|
1992-11-21
|
2KB
|
52 lines
#define CURSES_LIBRARY 1
#include <curses.h>
#undef keypad
#ifndef NDEBUG
char *rcsid_keypad = "$Header: c:/curses/portable/RCS/keypad.c%v 2.0 1992/11/15 03:28:58 MH Rel $";
#endif
/*man-start*********************************************************************
keypad() - enable keypad
X/Open Description:
This function changes the keypad option of the user's terminal.
If enabled (bf is TRUE), the user can press a function key (such
as the left arrow key) and getch() will return a single value
that represents the KEY_LEFT function key. (See Section 11.3.3,
Input Values.) If disabled, curses will not treat function keys
as special keys and the program has to interpret the escape
sequences itself. If the keypad is enabled, the terminal keypad
is turned on before input begins.
PDCurses Description:
In the above text, substitute the following string:
"escape sequences" -> "scan codes"
"Section 11.3.3" -> "curses.h" or "intro.man"
This routine is also provided as a macro.
X/Open Return Value:
The keypad() function returns OK on success and ERR on error.
X/Open Errors:
No errors are defined for this function.
Portability:
PDCurses int keypad( WINDOW* win, bool bf );
X/Open Dec '88 int keypad( WINDOW* win, bool bf );
BSD Curses int keypad( WINDOW* win, bool bf );
SYS V Curses int keypad( WINDOW* win, bool bf );
**man-end**********************************************************************/
int keypad( WINDOW *win, bool bf )
{
win->_use_keypad = bf;
return( OK );
}